<!DOCTYPE html>
<html lang=zh>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="format-detection" content="telephone=no,email=no,adress=no">
  <!-- Color theme for statusbar -->
  <meta name="theme-color" content="#000000" />
  <!-- 强制页面在当前窗口以独立页面显示,防止别人在框架里调用页面 -->
  <meta http-equiv="window-target" content="_top" />


  <title>Hexo博客常用插件及用法 | Hexo</title>
  <meta name="description" content="部分引用于链接：http://blog.cofess.com/2017/08/16/hexo-blogs-comonly-used-plugins-and-usage.html  hexo-autonofollowGithub：https://github.com/liuzc/hexo-autonofollow 简介：自动为站外链接添加nofollow属性 安装： 1$ npm install">
<meta name="keywords" content="hexo,hexo plugins">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo博客常用插件及用法">
<meta property="og:url" content="http://sangshi.oschina.io/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="部分引用于链接：http://blog.cofess.com/2017/08/16/hexo-blogs-comonly-used-plugins-and-usage.html  hexo-autonofollowGithub：https://github.com/liuzc/hexo-autonofollow 简介：自动为站外链接添加nofollow属性 安装： 1$ npm install">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2017-09-01T14:35:27.121Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo博客常用插件及用法">
<meta name="twitter:description" content="部分引用于链接：http://blog.cofess.com/2017/08/16/hexo-blogs-comonly-used-plugins-and-usage.html  hexo-autonofollowGithub：https://github.com/liuzc/hexo-autonofollow 简介：自动为站外链接添加nofollow属性 安装： 1$ npm install">
  <!-- Canonical links -->
  <link rel="canonical" href="http://sangshi.oschina.io/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/index.html">

    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">


    <link rel="icon" href="/favicon.png" type="image/x-icon">

  <!-- font-awesome CSS -->
  <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">



</head>


<body class="main-center">
  <section class="mainside">
  <div class="slimContent">
    <div class="navbar-header">


      <div class="profile-block text-center">
        <a id="avatar" href="https://git.oschina.net/sangshi" target="_blank">
          <img class="thumb-xl img-circle img-rotate" src="/images/avatar.jpg" width="200" height="200">
        </a>
        <h2 id="name" class="hidden-xs hidden-sm">sangshi</h2>
        <h3 id="title" class="hidden-xs hidden-sm hidden-md">我欲成仙，法力无边</h3>
        <small id="location" class="text-muted hidden-xs hidden-sm"><i class="fa fa-map-marker"></i> GuangZhou, China</small>
      </div>

      <div class="search" id="search-form-wrap">

    <form class="search-form sidebar-form">
        <div class="input-group">
            <input type="text" class="search-form-input form-control" placeholder="搜索" />
            <span class="input-group-btn">
                <button type="submit" class="search-form-submit btn btn-flat"><i class="fa fa-search"></i></button>
            </span>
        </div>
    </form>
    <div class="ins-search">
    <div class="ins-search-mask"></div>
    <div class="ins-search-container">
        <div class="ins-input-wrapper">
            <input type="text" class="ins-search-input" placeholder="想要查找什么..." x-webkit-speech />
            <button type="button" class="close ins-close ins-selectable" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
            <!-- <span class="ins-close ins-selectable"><i class="fa fa-times"></i></span> -->
        </div>
        <div class="ins-section-wrapper">
            <div class="ins-section-container"></div>
        </div>
    </div>
</div>

</div>
      <button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#main-navbar" aria-controls="main-navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <nav id="main-navbar" class="collapse navbar-collapse">
      <ul class="nav navbar-nav main-nav">



        <li class="menu-item menu-item-home">
          <a href="/.">

            <i class="fa fa-fw fa-dashboard"></i>

            <span class="menu-title">首页</span>
          </a>
        </li>



        <li class="menu-item menu-item-archives">
          <a href="/archives">

            <i class="fa fa-fw fa-delicious"></i>

            <span class="menu-title">归档</span>
          </a>
        </li>



        <li class="menu-item menu-item-categories">
          <a href="/categories">

            <i class="fa fa-fw fa-folder"></i>

            <span class="menu-title">分类</span>
          </a>
        </li>



        <li class="menu-item menu-item-tags">
          <a href="/tags">

            <i class="fa fa-fw fa-tags"></i>

            <span class="menu-title">标签</span>
          </a>
        </li>



        <li class="menu-item menu-item-about">
          <a href="/about">

            <i class="fa fa-fw fa-coffee"></i>

            <span class="menu-title">关于</span>
          </a>
        </li>

      </ul>
      <div class="footer">


    <ul class="social-links">

        <li><a href="https://git.oschina.net/sangshi" target="_blank" title="Github" data-toggle=tooltip data-placement=top><i class="fa fa-github"></i></a></li>

        <li><a href="https://git.oschina.net/sangshi" target="_blank" title="Weibo" data-toggle=tooltip data-placement=top><i class="fa fa-weibo"></i></a></li>

        <li><a href="https://git.oschina.net/sangshi" target="_blank" title="Twitter" data-toggle=tooltip data-placement=top><i class="fa fa-twitter"></i></a></li>

        <li><a href="https://git.oschina.net/sangshi" target="_blank" title="Behance" data-toggle=tooltip data-placement=top><i class="fa fa-behance"></i></a></li>

        <li><a href="/atom.xml" target="_blank" title="Rss" data-toggle=tooltip data-placement=top><i class="fa fa-rss"></i></a></li>

    </ul>

    <div class="copyright">
        &copy; 2017 John Doe<a href="https://beian.miit.gov.cn/" target="_blank">粤ICP备18158798号</a><a href="https://beian.miit.gov.cn/" target="_blank">粤ICP备18158798号</a>
        <div class="publishby">
        	<!-- Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>. -->
        	Theme by <a href="https://github.com/cofess" target="_blank"> cofess </a>base on <a href="https://github.com/cofess/hexo-theme-pure" target="_blank">pure</a>.
        </div>
    </div>
</div>
    </nav>
  </div>
</section>


    <section class="sidebar">
  <div class="slimContent">

      <div class="widget">
    <h3 class="widget-title">公告</h3>
    <div class="widget-body">
        <div id="board">

            <p>您好，您是第<span id="busuanzi_value_site_uv">0</span>位访客</p>

            <div class="content">
                <p>欢迎交流与分享经验!</p>
            </div>
        </div>
    </div>
</div>



  <div class="widget">
    <h3 class="widget-title">分类</h3>
    <div class="widget-body">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/NOSQL/">NOSQL</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/hexo/">hexo</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/其他/">其他</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/开源项目/">开源项目</a><span class="category-list-count">2</span></li></ul>
    </div>
  </div>




  <div class="widget">
    <h3 class="widget-title">标签</h3>
    <div class="widget-body">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo/">hexo</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hexo-plugins/">hexo plugins</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nosql/">nosql</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/oschina/">oschina</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/">redis</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/servlet/">servlet</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/商品详情页/">商品详情页</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/电商/">电商</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/码云/">码云</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/配置/">配置</a><span class="tag-list-count">2</span></li></ul>
    </div>
  </div>




  <div class="widget">
    <h3 class="widget-title">标签云</h3>
    <div class="widget-body tagcloud">
      <a href="/tags/git/" style="font-size: 13px;">git</a> <a href="/tags/hexo/" style="font-size: 14px;">hexo</a> <a href="/tags/hexo-plugins/" style="font-size: 13px;">hexo plugins</a> <a href="/tags/nosql/" style="font-size: 13px;">nosql</a> <a href="/tags/oschina/" style="font-size: 13px;">oschina</a> <a href="/tags/redis/" style="font-size: 13px;">redis</a> <a href="/tags/servlet/" style="font-size: 13px;">servlet</a> <a href="/tags/商品详情页/" style="font-size: 13px;">商品详情页</a> <a href="/tags/电商/" style="font-size: 13px;">电商</a> <a href="/tags/码云/" style="font-size: 13px;">码云</a> <a href="/tags/配置/" style="font-size: 14px;">配置</a>
    </div>
  </div>



  <div class="widget">
    <h3 class="widget-title">归档</h3>
    <div class="widget-body">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/">十一月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/">九月 2017</a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/">八月 2017</a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">二月 2016</a><span class="archive-list-count">1</span></li></ul>
    </div>
  </div>




  <div class="widget">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget-body">
      <ul class="recent-post-list list-unstyled no-thumbnail">

          <li>

            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/NOSQL/">NOSQL</a>
              </p>
              <p class="item-title">
                <a href="/2017/11/26/Linux-Redis安装配置和使用/" class="title">Linux Redis安装配置和使用</a>
              </p>
              <p class="item-date">
                <time datetime="2017-11-26T05:10:29.000Z" itemprop="datePublished">2017-11-26</time>
              </p>
            </div>
          </li>

          <li>

            <div class="item-inner">
              <p class="item-category">

              </p>
              <p class="item-title">
                <a href="/2017/09/02/商品详情页系统的Servlet3异步化实践-摘抄/" class="title">商品详情页系统的Servlet3异步化实践[摘抄]</a>
              </p>
              <p class="item-date">
                <time datetime="2017-09-02T15:58:37.000Z" itemprop="datePublished">2017-09-02</time>
              </p>
            </div>
          </li>

          <li>

            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/开源项目/">开源项目</a>
              </p>
              <p class="item-title">
                <a href="/2017/08/28/swagger-文档框架/" class="title">swagger 文档框架</a>
              </p>
              <p class="item-date">
                <time datetime="2017-08-28T03:17:25.000Z" itemprop="datePublished">2017-08-28</time>
              </p>
            </div>
          </li>

          <li>

            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/开源项目/">开源项目</a>
              </p>
              <p class="item-title">
                <a href="/2017/08/24/apolo-ctrip-configuration-management-platform-initial-experience/" class="title">Apollo携程配置管理平台初体验</a>
              </p>
              <p class="item-date">
                <time datetime="2017-08-24T14:12:29.000Z" itemprop="datePublished">2017-08-24</time>
              </p>
            </div>
          </li>

          <li>

            <div class="item-inner">
              <p class="item-category">
                <a class="category-link" href="/categories/hexo/">hexo</a>
              </p>
              <p class="item-title">
                <a href="/2017/08/23/hexo-various-configuration-problems/" class="title">Hexo各类配置问题</a>
              </p>
              <p class="item-date">
                <time datetime="2017-08-23T15:56:49.000Z" itemprop="datePublished">2017-08-23</time>
              </p>
            </div>
          </li>

      </ul>
    </div>
  </div>



  </div>
</section>



<section class="main">
  <div class="content">
  <article id="post-hexo-blog-[excerpt]-comon-plug-ins-and-usage" class="article article-type-post" itemscope itemprop="blogPost">

    <header class="article-header">



    <h1 class="article-title" itemprop="name">
      Hexo博客常用插件及用法
    </h1>



      <div class="article-meta">
        <span class="article-date">
    <i class="fa fa-calendar-check-o"></i>
	<a href="/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/" class="article-date">
	  <time datetime="2017-08-23T09:03:58.000Z" itemprop="datePublished">2017-08-23</time>
	</a>
</span>

  <span class="article-category">
    <i class="fa fa-folder"></i>
    <a class="article-category-link" href="/categories/其他/">其他</a>
  </span>


  <span class="article-tag">
    <i class="fa fa-tag"></i>
	<a class="article-tag-link" href="/tags/hexo/">hexo</a>, <a class="article-tag-link" href="/tags/hexo-plugins/">hexo plugins</a>
  </span>



	<span class="article-read hidden-xs">
	    <i class="fa fa-eye" aria-hidden="true"></i>
	    <span id="busuanzi_container_page_pv">
			阅读<span id="busuanzi_value_page_pv">0</span>次
		</span>
	</span>


        <span class="post-comment"><i class="fa fa-commenting-o"></i> <a href="/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/#comments" class="article-comment-link">评论</a></span>


		<span class="post-wordcount hidden-xs">字数统计: 1,024(字)</span>


		<span class="post-readcount hidden-xs">阅读时长: 5(分)</span>


      </div>

    </header>
    <div class="article-entry markdown-body" itemprop="articleBody">

        <blockquote>
<p>部分引用于链接：<a href="http://blog.cofess.com/2017/08/16/hexo-blogs-comonly-used-plugins-and-usage.html" target="_blank" rel="external">http://blog.cofess.com/2017/08/16/hexo-blogs-comonly-used-plugins-and-usage.html</a></p>
</blockquote>
<h2 id="hexo-autonofollow"><a href="#hexo-autonofollow" class="headerlink" title="hexo-autonofollow"></a>hexo-autonofollow</h2><p>Github：<a href="https://github.com/liuzc/hexo-autonofollow" target="_blank" rel="external">https://github.com/liuzc/hexo-autonofollow</a></p>
<p>简介：自动为站外链接添加nofollow属性</p>
<p>安装：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-autonofollow --save</div></pre></td></tr></table></figure>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">nofollow:</div><div class="line">  enable: true</div><div class="line">  exclude:</div><div class="line">    - exclude1.com</div><div class="line">    - exclude2.com</div></pre></td></tr></table></figure>
<p>-<strong>enable</strong> - 是否启用<br>-<strong>exclude</strong> - 排除域名</p>
<h2 id="hexo-baidu-url-submit"><a href="#hexo-baidu-url-submit" class="headerlink" title="hexo-baidu-url-submit"></a>hexo-baidu-url-submit</h2><p>Github：<a href="https://github.com/huiwang/hexo-baidu-url-submit" target="_blank" rel="external">https://github.com/huiwang/hexo-baidu-url-submit</a><br>简介：主动推送Hexo博客新链接至百度搜索引擎，解决百度爬虫被禁止访问的问题，提升网站收录质量和速度。</p>
<p>安装：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-baidu-url-submit --save</div></pre></td></tr></table></figure>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">baidu_url_submit:</div><div class="line">  count: 1 ## 提交最新的一个链接</div><div class="line">  host: blog.cofess.com ## 在百度站长平台中注册的域名</div><div class="line">  token: your_token ## 请注意这是您的秘钥， 所以请不要把博客源代码发布在公众仓库里!</div><div class="line">  path: baidu_urls.txt ## 文本文档的地址， 新链接会保存在此文本文档里</div></pre></td></tr></table></figure>
<ul>
<li><strong>token</strong> - 您得注册百度站长工具，然后在<strong>工具</strong>-&gt;<strong>网页抓取</strong>-&gt;<strong>链接提交</strong>里找到你的密匙。   </li>
</ul>
<p>其次，_config.ym文件中url的值， 必须是百度站长平台注册的域名， 比如:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"># URL</div><div class="line">url: blog.cofess.com</div><div class="line">root: /</div><div class="line">permalink: :year/:month/:day/:title/</div></pre></td></tr></table></figure>
<p>最后，加入新的deployer:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">deploy:</div><div class="line">- type: baidu_url_submitter</div></pre></td></tr></table></figure>
<p>执行hexo deploy的时候，新的链接就会被推送百度了。</p>
<h3 id="hexo-generator-feed"><a href="#hexo-generator-feed" class="headerlink" title="hexo-generator-feed"></a>hexo-generator-feed</h3><p>Github：<a href="https://github.com/hexojs/hexo-generator-feed" target="_blank" rel="external">https://github.com/hexojs/hexo-generator-feed</a></p>
<p>简介：RSS的生成插件，你可以在配置显示你站点的RSS，文件路径\atom.xml。</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-generator-feed --save</div></pre></td></tr></table></figure>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">feed:</div><div class="line">  type: atom</div><div class="line">  path: atom.xml</div><div class="line">  limit: 20</div><div class="line">  hub:</div><div class="line">  content:</div></pre></td></tr></table></figure></p>
<ul>
<li><strong>type</strong> - Feed type.(atom/rss2)</li>
<li><strong>path</strong> - Feed path. (Default: atom.xml/rss2.xml)</li>
<li><strong>limit</strong> - Maximum number of posts in the feed (Use 0 or false to show all posts)</li>
<li><strong>hub</strong> - URL of the PubSubHubbub hubs (Leave it empty if you don’t use it)</li>
<li><strong>content</strong> - (optional) set to ‘true’ to include the contents of the entire post in the feed.</li>
</ul>
<h3 id="hexo-generator-sitemap"><a href="#hexo-generator-sitemap" class="headerlink" title="hexo-generator-sitemap"></a>hexo-generator-sitemap</h3><p>Github：<a href="https://github.com/hexojs/hexo-generator-sitemap" target="_blank" rel="external">https://github.com/hexojs/hexo-generator-sitemap</a></p>
<p>简介：生成博客的sitemap。</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-generator-sitemap --save</div></pre></td></tr></table></figure></p>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">sitemap:</div><div class="line">    path: sitemap.xml</div></pre></td></tr></table></figure>
<h3 id="hexo-generator-baidu-sitemap"><a href="#hexo-generator-baidu-sitemap" class="headerlink" title="hexo-generator-baidu-sitemap"></a>hexo-generator-baidu-sitemap</h3><p>Github：<a href="https://github.com/coneycode/hexo-generator-baidu-sitemap" target="_blank" rel="external">https://github.com/coneycode/hexo-generator-baidu-sitemap</a></p>
<p>简介：生成博客的sitemap（针对百度）。</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-generator-baidu-sitemap --save</div></pre></td></tr></table></figure></p>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">baidusitemap:</div><div class="line">path: baidusitemap.xml</div></pre></td></tr></table></figure>
<h3 id="hexo-generator-json-content"><a href="#hexo-generator-json-content" class="headerlink" title="hexo-generator-json-content"></a>hexo-generator-json-content</h3><p>Github：<a href="https://github.com/alexbruno/hexo-generator-json-content" target="_blank" rel="external">https://github.com/alexbruno/hexo-generator-json-content</a></p>
<p>简介：用于生成静态站点数据，提供搜索功能的数据源。</p>
<p>安装：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-generator-json-content --save</div></pre></td></tr></table></figure>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">jsonContent:</div><div class="line">  ignore:</div><div class="line">    - path/to/a/page</div><div class="line">    - url/to/one/post</div><div class="line">    - an-entire-category</div><div class="line">    - specific.file</div><div class="line">    - .ext # a file extension</div></pre></td></tr></table></figure>
<h3 id="hexo-neat"><a href="#hexo-neat" class="headerlink" title="hexo-neat"></a>hexo-neat</h3><p>Github：<a href="https://github.com/rozbo/hexo-neat" target="_blank" rel="external">https://github.com/rozbo/hexo-neat</a></p>
<p>简介：自动压缩html、css、js代码</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-neat --save</div></pre></td></tr></table></figure></p>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">neat_enable: true</div></pre></td></tr></table></figure>
<p>压缩html代码<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">neat_html:</div><div class="line">  enable: true</div><div class="line">  exclude:</div></pre></td></tr></table></figure></p>
<p>压缩CSS<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">neat_css:</div><div class="line">  enable: true</div><div class="line">  exclude:</div><div class="line">    - &apos;*.min.css&apos;</div></pre></td></tr></table></figure></p>
<p>压缩JS<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line">neat_js:</div><div class="line">  enable: true</div><div class="line">  mangle: true</div><div class="line">  output:</div><div class="line">  compress:</div><div class="line">  exclude:</div><div class="line">    - &apos;*.min.js&apos;</div></pre></td></tr></table></figure></p>
<h3 id="hexo-translate-title"><a href="#hexo-translate-title" class="headerlink" title="hexo-translate-title"></a>hexo-translate-title</h3><p>Github：<a href="https://github.com/cometlj/hexo-translate-title" target="_blank" rel="external">https://github.com/cometlj/hexo-translate-title</a></p>
<p>简介：使用Google翻译，百度翻译和有道翻译将Hexo文章中的汉字标题转成英文标题</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-translate-title --save</div></pre></td></tr></table></figure></p>
<p>配置：</p>
<p>在博客配置文件_config.yml中添加<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">translate_title:</div><div class="line">  translate_way: google    #google | baidu | youdao</div><div class="line">  youdao_api_key: XXX</div><div class="line">  youdao_keyfrom: XXX</div><div class="line">  is_need_proxy: true     #true | false</div><div class="line">  proxy_url: http://localhost:4000</div></pre></td></tr></table></figure></p>
<p><strong>注意</strong>：判断是否需要配置google本地代理，如果没有被墙，请将_config.yml下的is_need_proxy: true改为false。如果设置为true,请设置本地代理地址</p>
<h3 id="hexo-wordcount"><a href="#hexo-wordcount" class="headerlink" title="hexo-wordcount"></a>hexo-wordcount</h3><p>Github：<a href="https://github.com/willin/hexo-wordcount" target="_blank" rel="external">https://github.com/willin/hexo-wordcount</a></p>
<p>简介：为文章添加文章字数统计、文章预计阅读时间</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">$ npm install hexo-wordcount --save</div></pre></td></tr></table></figure></p>
<p>使用：</p>
<p>通过以上安装后，你可以在你的模板文件加入以下相关的标签实现本插件的功能<br><strong>字数统计</strong>:WordCount<br><strong>阅读时长预计</strong>:Min2Read<br><strong>总字数统计</strong>: TotalCount</p>
<h3 id="hexo-asset-image"><a href="#hexo-asset-image" class="headerlink" title="hexo-asset-image"></a>hexo-asset-image</h3><p>Github: <a href="https://github.com/CodeFalling/hexo-asset-image" target="_blank" rel="external">https://github.com/CodeFalling/hexo-asset-image</a><br>简介：新建文章时创建与文章名一样的文件夹</p>
<p>安装：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">npm install hexo-asset-image --save</div></pre></td></tr></table></figure></p>
<p>使用：</p>
<ul>
<li>配置根目录_config.xml的 post_asset_folder 为true</li>
<li>创建文章时即可自动生成对应目录</li>
</ul>


    </div>
    <footer class="article-footer">
      <blockquote class="mt-2x">
  <ul class="post-copyright list-unstyled">

    <li class="post-copyright-link hidden-xs">
      <strong>本文链接：</strong>
      <a href="http://sangshi.oschina.io/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/" title="Hexo博客常用插件及用法" target="_blank" rel="external">http://sangshi.oschina.io/2017/08/23/hexo-blog-[excerpt]-comon-plug-ins-and-usage/</a>
    </li>

    <li class="post-copyright-license">
      <strong>版权声明： </strong> 本博客所有文章除特别声明外，均采用 <a href="http://creativecommons.org/licenses/by/4.0/deed.zh" target="_blank" rel="external">CC BY 4.0 CN协议</a> 许可协议。转载请注明出处！
    </li>
  </ul>
</blockquote>


<div class="panel panel-default panel-badger">
  <div class="panel-body">
    <figure class="media">
      <div class="media-left">
        <a href="https://git.oschina.net/sangshi" target="_blank" class="img-burn thumb-sm visible-lg">
          <img src="/images/avatar.jpg" class="img-rounded w-full" alt="">
        </a>
      </div>
      <div class="media-body">
        <h3 class="media-heading"><a href="https://git.oschina.net/sangshi" target="_blank"><span class="text-dark">sangshi</span><small class="ml-1x">我欲成仙，法力无边</small></a></h3>
        <div>~~~~~~~</div>
      </div>
    </figure>
  </div>
</div>


    </footer>
  </article>


  <div id="comments">


    <div id="uyan_frame"></div>


  </div>



</div>

  <nav class="bar bar-footer clearfix" data-stick-bottom>
  <div class="bar-inner">

  <ul class="pager pull-left">

    <li class="prev">
      <a href="/2017/08/23/hexo-various-configuration-problems/" title="Hexo各类配置问题"><i class="fa fa-angle-left" aria-hidden="true"></i>&nbsp;&nbsp;上一篇</a>
    </li>


    <li class="next">
      <a href="/2016/02/14/git-configuration-of-multiple-machines/" title="git配置一机多号">下一篇&nbsp;&nbsp;<i class="fa fa-angle-right" aria-hidden="true"></i></a>
    </li>

  </ul>



  <div class="bar-right">
    <div class="share-component" data-sites="weibo,qq,wechat,facebook,twitter" data-mobile-sites="weibo,qq,qzone"></div>
  </div>

  </div>
</nav>



</section>

  <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="js/jquery.min.js"><\/script>')
</script>
<script src="/js/plugin.js"></script>
<script src="/js/application.js"></script>




        <script>
(function (window) {
    var INSIGHT_CONFIG = {
        TRANSLATION: {
            POSTS: '文章',
            PAGES: '页面',
            CATEGORIES: '分类',
            TAGS: '标签',
            UNTITLED: '(未命名)',
        },
        ROOT_URL: '/',
        CONTENT_URL: '/content.json',
    };
    window.INSIGHT_CONFIG = INSIGHT_CONFIG;
})(window);
</script>
<script src="/js/insight.js"></script>



<script defer src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>







    <script defer type="text/javascript" src="http://v2.uyan.cc/code/uyan.js?uid=[object Object]"></script>







</body>
</html>
